/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author eco
 */
@Entity
@Table(name="livro")
public class Livro extends EntidadeGenerica {
    
    @Column(name="nome",length=100,nullable=false)
    private String nome;
    
    @ManyToOne
    @JoinColumn(name="autor_fk",nullable=false)
    private Autor autor;
    
    
    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }
    
    public Autor getAutor() {
        return autor;
    }

    public void setAutor(Autor autor) {
        this.autor = autor;
    }
    
}
